package cn.jinjimi.app.main.activity;

import cn.jinjimi.app.R;
import cn.jinjimi.app.main.extend.ToolBarCommonActivity;

import uk.co.senab.photoview.PhotoView;

/**
 * Created by Roy
 * Date: 15/9/8
 */
public class PhotoBrowserSingleActivity extends ToolBarCommonActivity {
    public final static String URL = "url";
    public final static String TITLE = "title";

    private String imgUrl;
    private String title;

    @Override
    protected void beforeInitView() {
        setContentView(R.layout.activity_photo_single_layout);
        imgUrl = getIntent().getStringExtra(URL);
        title = getIntent().getStringExtra(TITLE);
    }

    @Override
    protected void initial() {
        initView();
    }

    protected void initView() {
        PhotoView img = (PhotoView) findViewById(R.id.photo_view);
        setTitle(title);
        img.setImageUri(imgUrl);
    }
}
